SERVICE_NAME=${PWD##*/}
JAR=$SERVICE_NAME.jar
MPORT=8080
echo ">>> mvn clean package -Dmaven.javadoc.skip=true"
mvn clean package -Dmaven.javadoc.skip=true -Dmaven.test.skip=true
echo ">>> cd target"
cd target
mv app.jar $JAR
echo ">>> kill -9 $(lsof -t -sTCP:LISTEN -i:$MPORT)"
kill -9 $(lsof -t -sTCP:LISTEN -i:$MPORT)
JAVA_OPTS="-Xms2024m -Xmx2024m -Dspring.profiles.active=dev"
echo ">>> nohup java -jar $JAVA_OPTS $JAR >app.log 2>&1 &"
BUILD_ID=dontKillMe nohup java -jar $JAVA_OPTS $JAR >app.log 2>&1 &